package com.yayan.xh.dao;

import java.util.List;
import java.util.Map;

import com.yayan.xh.bean.IntegralBean;

public interface IIntegralDao {
	
	/**
	 * 获取用户对应等级的折扣
	 * @param map
	 * @return
	 * @throws Exception
	 */
	Map<String, Object> getUserSale(Map<String, String> map) throws Exception;
	
	/**
	 * 获取积分信息
	 * @param map
	 * @return
	 * @throws Exception
	 */
	List<Map<String, Object>> getIntegralById(Map<String, String> map) throws Exception;
	
	/**
	 * 获取积分信息后台
	 * @param map
	 * @return
	 * @throws Exception
	 */
	List<IntegralBean> getIntegralBack(Map<String, String> map) throws Exception;
	
	/**
	 * 通过会员ID查询
	 * @param map
	 * @return
	 * @throws Exception
	 */
	IntegralBean getIntegralBackByUserId(Map<String, String> map) throws Exception;
	
	/**
	 * 减少积分
	 * @param map
	 * @return
	 * @throws Exception
	 */
	boolean subtractIntegral(Map<String, String> map) throws Exception;
	
	/**
	 * 增加积分
	 * @param map
	 * @return
	 * @throws Exception
	 */
	boolean addIntegral(Map<String, String> map) throws Exception;
}
